import { debounce } from "./utils";
import BackTop from "components/context/backTop/BackTop";
export const imgLoadRefresh = {
    data() {
        return {
            imgRefresh: null,
        }
    },
    mounted() {
        const refresh = debounce(this.$refs.scroll.refresh, 500);
        this.imgRefresh = () => {
            refresh();
        };
        this.$bus.$on("imgItemLoad", this.imgRefresh);
    }
}

export const backTopcom = {
    components: {
        BackTop
    },
    data() {
        return {
            isShowBackTop: false,
        }
    },
    methods: {
        backTopClick() {
            this.$refs.scroll.scrollTop(0, 0);
        },
    }
}
